package com.company.service;

import com.company.CompanyException;
import com.company.model.Company;
import com.company.model.request.CompanyForm;
import com.company.model.request.CompanyQuery;
import com.company.model.result.PageResult;

/**
 * Created by tu on 2017/4/26.
 */
public interface ICompanyService {

  /**
   * 公司列表
   *
   * @param {@link CompanyQuery}
   * @return {@link PageResult< Company >}
   */
  PageResult<Company> list(CompanyQuery query);

  /**
   * 获取公司
   *
   * @param query {@link CompanyQuery}
   * @return {@link Company}
   */
  Company find(CompanyQuery query) throws CompanyException;

  /**
   * @param info {@link CompanyForm}
   * @param userAgent userAgent
   * @return {@link Company}
   */
  Company add(CompanyForm info, String userAgent) throws CompanyException;
}